package com.ruoyi.web.controller.fenxi.emums;

/**
 * 用户状态
 * 
 * @author ruoyi
 */
public enum RiskTypeEnum
{
    DAOJUE("1", "盗掘"),
    DAOJIE("2", "盗窃"),
    HUOZAI("3", "火灾"),
    FAREN("4", "法人");

    private final String code;
    private final String info;

    RiskTypeEnum(String code, String info)
    {
        this.code = code;
        this.info = info;
    }
    public static String  getCodeByinfo(String info){
        for (RiskTypeEnum o : RiskTypeEnum.values()) {
            if(o.getInfo().equals(info)){
                return o.getCode();
            }

        }
        return  null;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
}
